using System;
using System.Collections.Generic;
using System.Text;
using SpoonCore2.Client;
using SpoonCore2.Message;

namespace SpoonCore2.Service.Stun
{
	public class StunService : AbstractService
	{
		private static readonly SpoonIdentifier _id = SpoonIdentifier.Parse("71AC06EF9A93B75EC51D12B27561C656");
		private static readonly SpoonIdentifier Step = SpoonIdentifier.Parse("88888888888888888888888888888888");
		public override SpoonIdentifier Id { get { return _id; } }

		public override void Dispose()
		{

		}

		public override void Init()
		{
			Handler.Register(new MessageHandler.ReceiveMessageHandler<StunMessage>(MessageReceive));
		}

		public void Pair(SpoonIdentifier id)
		{
			StunMessage msg = new StunMessage();
			msg.Command = StunMessage.CommandValue.Register;
			msg.Type = StunMessage.TypeValue.Request;
			msg.Id = Manager.Network.ClientInfo.Id;
		}

		private void MessageReceive(ClientInfo sender, StunMessage message)
		{
			if(message.Type == StunMessage.TypeValue.Request)
			{
				if(message.Command == StunMessage.CommandValue.Register)
				{
					
				}
			}
		}

		public override void Start()
		{
			
		}

		public override void Stop()
		{
			
		}
	}
}
